<template>
  <div>
    <h1>兄弟组件传值</h1>
    <A @on-click-b="getParamA" :paramB="paramB"></A>
    <B @on-click-a="getParamB" :paramA = "paramA"></B>
  </div>
</template>

<script setup lang=ts>
import A from "@/components/bus/A.vue"
import B from "@/components/bus/B.vue"
import {ref} from "vue"
const paramA = ref<string>("")
const getParamA = (p:string)=>{
  paramA.value = p
}

const paramB = ref<string>("");
const getParamB = (p:string)=>{
  paramB.value = p
}

  
</script>

<style scoped>
</style>